﻿using mvcForum.AddOns;
using mvcForum.Web.Interfaces;

using System;
using System.Web.Mvc;

namespace MVCForum.Editors.HtmlEditor {

	public class HtmlParser : IContentParser {

		public String Name {
			get {
				return "Html";
			}
		}

		public MvcHtmlString Parse(String content) {
			return MvcHtmlString.Create(content.SanitizeHTML(new String[] { "script" }));
		}

		public String Quote(String author, String content) {
			return String.Format(@"<blockquote>
  <p><cite title=""{0}"">{0}</cite> wrote</p>
  <p>{1}</p>
</blockquote>", author, content);
		}
	}
}